#include <iostream>
#include <set>

#include "Point.h"

using namespace std;

void test0(){

    cout << "overload operator < to init set" << endl;
    set<Point> number = {
        Point(1, 2),
        Point(1, -2),
        Point(-1, 2),
        Point(1, 2),
        Point(3, 2),
        Point(4, 2),
    };
    cout << endl << endl;

    cout << "specialization class Compare = std::less<Key>" << endl;
    set<Point,struct std::less<Point>> number1 = {
        Point(1, 2),
        Point(1, -2),
        Point(-1, 2),
        Point(1, 2),
        Point(3, 2),
        Point(4, 2),
    };
    cout << endl << endl;

    cout << "function object" << endl;
    set<Point, ComparePoint> number2 = {
        Point(1, 2),
        Point(1, -2),
        Point(-1, 2),
        Point(1, 2),
        Point(3, 2),
        Point(4, 2),
    };

    for(auto & i : number){
        cout << i << endl;
    }

    for(auto & i : number1){
        cout << i << endl;
    }

    for(auto & i : number2){
        cout << i << endl;
    }
}

int main()
{
    test0();
    return 0;
}

